(function(app) {
    app
        .controller("content_29_inputCtrl", ["$scope", "$state", "myFactory", '$stateParams', "$q", '$timeout', '$location', '$http', '$ionicHistory', function($scope, $state, myFactory, $stateParams, $q, $timeout, $location, $http, $ionicHistory) {

            //接收参数
            var itemId = "29"; //变更项目ID
            var chdrnum01 = $stateParams.chdrnum01; //保单号
            $scope.chdrnum01 = $stateParams.chdrnum01; //保单号
            var chdrcoy = $stateParams.chdrcoy; //保单公司号码
            var item29 = $stateParams.item29;
            var initFlag = false; //检测标志，在初始化函数完成后，会被置为true
            var token = sessionStorage.getItem("token");
            console.log("content_29_input begin.....");

            //S2020050812880-个人信息安全项目-修改变更项目录入页面的个人信息授权内容需求 add by yangyan 20200615 start
            $scope.readFlag = false; //阅读协议标志，默认为false
            //S2020050812880-个人信息安全项目-修改变更项目录入页面的个人信息授权内容需求 add by yangyan 20200615 end
            var item15_health=sessionStorage.getItem("item15_health");
            var item30_health=sessionStorage.getItem("item30_health");
            var tabFlagItem= [true, false, false];
            if(item15_health=="true" || item30_health=="true"){
            	tabFlagItem= [false,false,true];
            	document.getElementById("health").style.display="none";
            	document.getElementById("business").style.display="none";
            }else{
            	tabFlagItem= [true, false, false];
            }
         
            
            $scope.data = {
                a_lf_flag_2_checkFlagY: false,
                a_lf_flag_2_checkFlagN: false,
                a_lf_2_ShowFlag: false,
                a_lf_flag_3_checkFlagY: false,
                a_lf_flag_3_checkFlagN: false,
                a_lf_3_ShowFlag: false,
                show_h_ow_tbr_0: false,
                show_b_ow_tbr_0: false,
                //tabFlag: [true, false],
                tabFlag: tabFlagItem,
            };


            /**********************************************初始化函数begin****************************************************/
            var itemData = "";
            var lfAge = "";
            var owAge = "";
            var lfSex = "";
            var owSex = "";

            //初始化
            $scope.load = function() {
                    myFactory.loadingShow(); //显示加载圈
                    var timestamp = myFactory.getTimetamp();
                    var sfis = "itemId-token-timestamp";
                    var signStr = "itemId=" + itemId + "&token=" + token + "&timestamp=" + timestamp; //encodeURI(name)
                    var sign = myFactory.hex(signStr);
                    var item = { "sourceFlag": "1" };
                    $http({
                        method: 'GET',
                        url: app.domain + 'input/saveContentItem29.action',
                        params: { 'itemId': itemId, 'itemStr': item, 'sign': sign, 'sfis': sfis, 'token': token, 'timestamp': timestamp }
                    }).then(function successCallback(response) {
                        if (response.data.success) {
                            myFactory.loadingShow(); //显示加载圈
                            itemData = response.data.data.itemData;
                            lfAge = itemData.lfAge;
                            lfSex = itemData.lfSex;
                            owAge = itemData.owAge;
                            owSex = itemData.owSex;

                            item29 = itemData.item29;
                            console.log("年龄：" + lfAge);
                            console.log("性别：" + lfSex);

                            //被保人和投保人显示控制
                            //健康告知
                            var tbr = item29.roleFlag;
                            if (tbr == "Y") {
                                $scope.data.show_h_ow_tbr_0 = true;
                            }

                            //职业告知
                            //投保PB险种,需显示投保人
                            var owShow = item29.roleFlagAcc;
                            if (owShow == "Y") {
                                $scope.data.show_b_ow_tbr_0 = true;
                            }
                            //$scope.data.show_b_ow_tbr_0=true;//测试

                            $http({
                                method: 'GET',
                                url: app.domain + 'input/initContentItem.action',
                                params: { 'itemId': itemId, 'chdrnum': chdrnum01, 'sign': sign, 'sfis': sfis, 'token': token, 'timestamp': timestamp }
                            }).then(function successCallback(response) {
                                if (response.data.success) {
                                    $scope.chdrnum01 = response.data.data.policy.base.chdrnum01;
                                    $scope.item29 = response.data.data.modelMap.item29;
                                    policy = response.data.data.policy;
                                    initFlag = true; //标识初始化成功
                                }
                                myFactory.loadingHide();
                            }, function errorCallback(response) {
                                myFactory.loadingHide();
                                myFactory.alert("", "初始化查询变更项内容失败!", "info");
                            });
                        }
                        myFactory.loadingHide();
                    }, function errorCallback(response) {
                        //					alert('查询数据失败!');
                        myFactory.loadingHide();
                        myFactory.alert("", "初始化失败，请返回重试!", "info");
                    });

                }
                /**********************************************初始化函数end****************************************************/

            //选项卡切换
            $scope.tabChange = function(index) {
                for (var i = 0; i < 3; i++) {
                    if (i == index) {
                        $scope.data.tabFlag[i] = true;
                        console.log("select type:" + i); //H-健康告知、A-财务告知、B-职业告知

                        var sourceFlag = "";
                        switch (i) {
                            case 0:
                                sourceFlag = "h";
                                console.log("H-健康告知"); //H-健康告知
                                break;
                            case 1:
                                sourceFlag = "b";
                                console.log("B-职业告知"); //B-职业告知
                                break;
                            case 2:
                                sourceFlag = "a";
                                console.log("A-财务告知"); //A-财务告知
                                break;
                        }

                        var timestamp = myFactory.getTimetamp();
                        var sfis = "itemId-token-timestamp";
                        var signStr = "itemId=" + itemId + "&token=" + token + "&timestamp=" + timestamp; //encodeURI(name)
                        var sign = myFactory.hex(signStr);
                        //每次切换tab菜单重新获取一次后台数据
                        item29 = { "sourceFlag": sourceFlag };
                        $http({
                            method: 'GET',
                            url: app.domain + 'input/saveContentItem29.action',
                            params: { 'itemId': itemId, 'itemStr': item29, 'sign': sign, 'sfis': sfis, 'token': token, 'timestamp': timestamp }
                        }).then(function successCallback(response) {
                            if (response.data.success) {
                                itemData = response.data.data.itemData;
                                //根据不同的告知类型重新赋值
                                lfAge = itemData.lfAge;
                                lfSex = itemData.lfSex;
                                owAge = itemData.owAge;
                                owSex = itemData.owSex;
                            }
                        }, function errorCallback(response) {
                            myFactory.alert('', '查询数据失败!', 'info');
                        });

                    } else {
                        $scope.data.tabFlag[i] = false;
                        console.log("not select type:" + i);
                    };
                };
            }

            //返回上一页
            $scope.goBack = function() {
                myFactory.goBack();

            }

            //关闭遮罩
            $scope.overwindowClose = function() {
                //$(".overwindow").show();
                $(".overwindow").hide();
                $(".overmodal").hide();
            }

            $scope.toHealth = function(type) {
                console.log("initFlag：" + initFlag);
                if (!initFlag) {
                    myFactory.alert("", "初始化未完成，请重试", "info");
                    return;
                }
                $scope.tabChange(0);
                if (type == 'lf') { //被保人
                    $state.go('content_29_healthBbr', {
                        itemId: itemId,
                        chdrnum01: chdrnum01,
                        chdrcoy: chdrcoy,
                        item29: item29,
                        lfAge: lfAge,
                        lfSex: lfSex
                    });
                } else {
                    $state.go('content_29_healthTbr', {
                        itemId: itemId,
                        chdrnum01: chdrnum01,
                        chdrcoy: chdrcoy,
                        item29: item29,
                        owAge: owAge,
                        owSex: owSex
                    });
                }
            }
            $scope.toFinance = function(type) {
                if (!initFlag) {
                    myFactory.alert("", "初始化未完成，请重试", "info");
                    return;
                }
                $scope.tabChange(2);
                if (type == 'lf') { //被保人
                    $state.go('content_29_financeBbr', {
                        itemId: itemId,
                        chdrnum01: chdrnum01,
                        chdrcoy: chdrcoy,
                        item29: item29,
                        lfAge: lfAge,
                        lfSex: lfSex
                    });
                }
            }

            $scope.toBusiness = function(type) {
                if (!initFlag) {
                    myFactory.alert("", "初始化未完成，请重试", "info");
                    return;
                }
                $scope.tabChange(1);
                if (type == 'lf') { //被保人
                    $state.go('content_29_businessBbr', {
                        itemId: itemId,
                        chdrnum01: chdrnum01,
                        chdrcoy: chdrcoy,
                        item29: item29
                    });
                } else {
                    $state.go('content_29_businessTbr', {
                        itemId: itemId,
                        chdrnum01: chdrnum01,
                        chdrcoy: chdrcoy,
                        item29: item29
                    });
                }
            }

            //公共变量定义
            var _problemId = ""; //	题库编号
            var _role = ""; //	答题人角色（投保人、被保人）
            var _typeHealth = "h"; //	告知类型：健康告知
            var _typeAccount = "a"; //	告知类型：财务告知
            var _typeBusiness = "b"; //	告知类型：职业告知
            var _splitSign = "|"; //	分割符号，用于组装多个数据元素

            var _content = "";
            var _contentRes = "";

            /**********************  财务告知 start **************************/
            //打开财务告知对话框
            $scope.openAccountPop = function(problemId, role) {
                //function openAccountPop(problemId,role){
                //	保存数据
                _problemId = problemId;
                _role = role;

                //alert(role);
                var _content = $("#a_" + _role + "_" + _problemId).val(); //	原有填写金额内容
                //var _content = $.scope.data.mainLoanMoney;

                if (_problemId == '2' || _problemId == '3') {
                    //	被保人
                    /*if( _role=="lf" ){
                    	$("#a_th_"+_problemId+"_title").html("被保险人告知事项");
                    }*/
                    //	被保人
                    /*if( _role=="ow" ){
                    	$("#a_th_"+_problemId+"_title").html("投保人告知事项");
                    }*/

                    //	把原有值赋值到弹出框内容中
                    if (_problemId == '2') {
                        $("#a_number_" + _problemId).val(_content);
                    }

                    if (_problemId == '3') {
                        var res3 = $("#a_" + _role + "_" + _problemId + "_res").val();
                        $("#a_number_" + _problemId).val(_content);
                        $("#a_number_" + _problemId + "_res").val(res3);
                    }

                    //	显示弹出框
                    //$("#a_pop_"+_problemId).popup("open");
                    //"a_" + _role + "_flag_" + _problemId
                    //$scope.data["a_" + _role + "_flag_" + _problemId+'_checkFlag']=true;
                    $scope.data["a_" + _role + "_flag_" + _problemId + '_checkFlagN'] = false;
                    $scope.data["a_" + _role + "_flag_" + _problemId + '_checkFlagY'] = true;
                    console.log("N:" + $scope.data["a_" + _role + "_flag_" + _problemId + '_checkFlagN']);
                    console.log("Y:" + $scope.data["a_" + _role + "_flag_" + _problemId + '_checkFlagY']);
                    //$scope.data.a_lf_flag_2_checkFlag = true;
                    modal('open', 'a_pop_' + _problemId, 'overwindow', 'a_pop_' + _problemId + '_closeX');
                }
            }

            //确认，关闭财务告知弹出框
            $scope.confirmAccountPop = function() {
                //function closeAccountPop(){
                var _content = "";
                if (_problemId == '2') {
                    _content = $("#a_number_2").val().trim(); //	填写内容
                    /*if( "" == _content ){
                    	document.getElementById("a_err_2").style.display="";
                    	return false;
                    }else{
                    	document.getElementById("a_err_2").style.display="none";
                    }*/
                    if ("" == _content) {
                        myFactory.alert('', '请填写未偿还金额！', 'info');
                        return false;
                    }
                }
                if (_problemId == '3') {
                    _content = $("#a_number_3").val().trim(); //	填写内容
                    _contentRes = $("#a_number_3_res").val().trim(); //	填写内容
                    /*if( "" == _content || "" == _contentRes ){
                    	document.getElementById("a_err_3").style.display="";
                    	return false;
                    }else{
                    	document.getElementById("a_err_3").style.display="none";
                    }*/
                    if ("" == _content || "" == _contentRes) {
                        myFactory.alert('', '请完整填写未偿还金额及原因！', 'info');
                        return false;
                    }
                }

                //	关闭弹出框
                //$("#a_pop_"+_problemId).popup("close");
                //modal('close','main_loan_model','overwindow','main_loan_closeX');
                modal('close', 'a_pop_' + _problemId, 'overwindow', 'a_pop_' + _problemId + '_closeX');
                $scope.setAccountAnswerYes(_content);
            }

            //	设置财务告知回答为<是>
            $scope.setAccountAnswerYes = function(content) {
                //function setAccountAnswerYes(content){
                //	保存页面所填写的内容
                $("#a_" + _role + "_" + _problemId).val(content);
                //	第三题答案以格式[xxx,xxx]保存
                if (_problemId == "3") {
                    var res_3 = $("#a_number_3_res").val();
                    $("#a_" + _role + "_" + _problemId + "_res").val(res_3);
                    content = content + "," + res_3;
                }

                //显示区域内容
                hideAccountAnswer();

                //	保存告知信息
                saveNotifyData(_typeAccount, "Y", content);
            }

            //	设置财务告知回答为<否>
            $scope.setAccountAnswerNo = function(problemId, role) {
                //function setAccountAnswerNo(problemId,role){
                //	保存数据
                _problemId = problemId;
                _role = role;

                //$scope.data["a_" + _role + "_flag_" + _problemId+'_checkFlag']=false;
                $scope.data["a_" + _role + "_flag_" + _problemId + '_checkFlagN'] = true;
                $scope.data["a_" + _role + "_flag_" + _problemId + '_checkFlagY'] = false;
                console.log("N:" + $scope.data["a_" + _role + "_flag_" + _problemId + '_checkFlagN']);
                console.log("Y:" + $scope.data["a_" + _role + "_flag_" + _problemId + '_checkFlagY']);
                //隐藏区域内容
                hideAccountAnswer();

                //	保存告知信息
                saveNotifyData(_typeAccount, "N", "");
            }

            //	隐藏财务告知问题内容
            function hideAccountAnswer() {
                var accountAns = new Array("2", "3");
                //var accountAns=new Array("2");
                for (var i = 0; i < accountAns.length; i++) {
                    var _currProblemId = accountAns[i]; //	当前题库编号
                    var lfId = "a_tb_lf_" + _currProblemId;
                    //var owId = "a_tb_ow_" + _currProblemId ;

                    //var lf_flag = $("input:radio[name=CB_"+_currProblemId.toUpperCase()+"]:checked").val();	//	当前编号对应的被保险人题库值
                    //var lf_flag=$scope.data["a_lf_flag_" + _currProblemId+'_checkFlag'];
                    //var lf_flag=$("#NCB_"+_currProblemId.toUpperCase()).attr("checked");
                    /*if(lf_flag=='checked'){
                    	//console.log("selected:"+type);
                    }else{
                    	//console.log("selected:"+type);
                    }*/
                    var lf_flag = $scope.data["a_lf_flag_" + _currProblemId + '_checkFlagY'];

                    //	没有选择被保险人的"是、否"选项时隐藏当前变更项所属区域块内容
                    /*if( "Y" == lf_flag){
                    	document.getElementById(lfId).style.display="";
                    } else {
                    	document.getElementById(lfId).style.display="none";
                    }*/
                    if (lf_flag) {
                        $scope.data["a_lf_" + _currProblemId + '_ShowFlag'] = true;
                    } else {
                        $scope.data["a_lf_" + _currProblemId + '_ShowFlag'] = false;
                    }
                }
            }

            function showAnswerQueestion3(a_lf_3) {
                /*****  被保人 ****/
                //var hisCnt = '${a_lf_3 }';		//	原有填写金额及原因内容
                var hisCnt = a_lf_3;
                var arrs = hisCnt.split(',');
                $("#a_lf_3").val(arrs[0]); //	金额
                $("#a_lf_3_res").val(arrs[1]); //	原因
                /****** 投保人 *****/
                /*hisCnt = '${a_ow_3 }';			//	原有填写金额及原因内容
                arrs = hisCnt.split(',');
                $("#a_ow_3").val(arrs[0]);		//	金额
                $("#a_ow_3_res").val(arrs[1]);	//	原因*/
            }

            /**********************  财务告知 end **************************/




            /**
             * 保存数据到后台
             * type - 告知类型 (H-健康告知,A-财务告知,B-职业告知)
             * flag - 答题状态位（是、否）
             * content - 答题内容
             **/
            function saveNotifyData(_type, _flag, _content) {
                var ret = false;
                var returnFlag = "";
                //	对字符串编码
                var deContent = encodeURI(_content);
                var timestamp = myFactory.getTimetamp();
                var sfis = "type-problemId-role-flag-token-timestamp";
                var signStr = "type=" + _type + "&problemId=" + _problemId + "&role=" + _role + "&flag=" + _flag + "&token=" + token + "&timestamp=" + timestamp; //encodeURI(name)
                var sign = myFactory.hex(signStr);
                var param = { 'type': _type, 'problemId': _problemId, 'role': _role, 'flag': _flag, 'content': deContent, 'sign': sign, 'sfis': sfis, 'token': token, 'timestamp': timestamp };
                $http({
                    method: 'GET',
                    url: app.domain + 'common/saveNotify29.action',
                    params: param
                }).then(function successCallback(response) {
                    if (response.data.success) {
                        returnFlag = response.data.data.returnFlag;
                        if (returnFlag == "fail") {
                            ret = true;
                        }
                    }
                }, function errorCallback(response) {
                    $.alert({
                        title: '',
                        text: '查询失败!',
                        onOK: function() {}
                    });
                });

                return ret;
            }

            //下一步
            $scope.nextStep = function() {
                //判断是否初始化完成了，如果失败，不予进入下一步
                /*if(!initFlag){
                	myFactory.alert("","初始化时失败，请返回上一步重试","info");
                	return;
                }*/
                /*S2020050812880-个人信息安全项目-修改变更项目录入页面的个人信息授权内容需求 add by yangyan 20200615 start*/
                //检测查阅弹框
                if(item15_health=="true" || item30_health=="true"){
	               
                }else{
                	 var readImageFlag = $("#readImageFlag").val();
 	                 if (readImageFlag == "false") {
 	                    myFactory.alert('', "请阅读《投保人/被保险人声明与须知事项》和《中信保诚隐私政策》！", 'info');
 	                    return;
 	                }
                }
                /*S2020050812880-个人信息安全项目-修改变更项目录入页面的个人信息授权内容需求 add by yangyan 20200615 end*/

                var timestamp = myFactory.getTimetamp();
                var sfis = "param1-token-timestamp";
                var signStr = "param1=" + "22" + "&token=" + token  + "&timestamp=" + timestamp; //encodeURI(name)
                
                var sign = myFactory.hex(signStr);
                var ret = false;
                //	对字符串编码
                var param = "";
                if(item15_health=="true" || item30_health=="true"){
                    param = { 'param1': "22", 'itemId': itemId, 'sign': sign, 'health':'health', 'sfis': sfis, 'token': token, 'timestamp': timestamp };
                }else{
                    param = { 'param1': "22", 'itemId': itemId, 'sign': sign,'health':'', 'sfis': sfis, 'token': token, 'timestamp': timestamp };
                }

                $http({
                    method: 'GET',
                    url: app.domain + 'common/checkNotifyItem29.action',
                    params: param
                }).then(function successCallback(response) {
                    if (response.data.success) {
                        var data = response.data.data.result;
                        if (data == "Y") {
                            ret = true;
                        } else if ("1" == data) {
                            if(item15_health=="true" || item30_health=="true"){
                               
                            }else{
                                myFactory.alert('', '健康告知信息填写不完整！', 'info');
                            }
                        } else if ("3" == data) {
                        	if(item15_health=="true" || item30_health=="true"){
                                
                            }else{
                            	 myFactory.alert('', '职业告知信息填写不完整！', 'info');
                            }
                        } else {
                            myFactory.alert('', '未知信息填写不完整！', 'info');
                        }

                        if (ret) {
                            console.log('取消承保条件检测通过');
                            item29 = { "sourceFlag": "" };
                            //item29["sourceFlag"] = "";
                            var item = item29;


                            var token = sessionStorage.getItem("token");
                            var timestamp = myFactory.getTimetamp();
                            var sfis = "itemId-token-timestamp";
                            var signStr = "itemId=" + itemId + "&token=" + token + "&timestamp=" + timestamp; //encodeURI(tbrName)
                            var sign = myFactory.hex(signStr);
                            myFactory.loadingShow();

                            $ionicHistory.clearCache().then(function() {
                                $state.go('content_check_main', {
                                    itemId: itemId,
                                    item: item,
                                    chdrnum01: chdrnum01,
                                    chdrcoy: chdrcoy
                                });
                            })
                            //健康告知只需要置一个就够了
                            if(item15_health=="true" || item30_health=="true"){

                            }else{
                                sessionStorage.setItem("item29_health", true);
                            }
                        } else {
                          //  myFactory.alert('', '取消承保条件检测不通过！', 'info');
                            console.log('取消承保条件检测不通过');
                        }

                    }
                }, function errorCallback(response) {
                    $.alert({
                        title: '',
                        text: '查询失败!',
                        onOK: function() {}
                    });
                });

            }

            /**
             * 检测数据是否填写完整
             * type - 告知类型 (H-健康告知,A-财务告知,B-职业告知)
             * flag - 答题状态位（是、否）
             * content - 答题内容
             **/
            function checkNotify() {
                var ret = false;
                var timestamp = myFactory.getTimetamp();
                var sfis = "param1-token-timestamp";
                var signStr = "param1=" + "22" + "&token=" + token + "&timestamp=" + timestamp; //encodeURI(name)
                var sign = myFactory.hex(signStr);
                var ret = false;
                //	对字符串编码
                var param = { 'param1': "22", 'sign': sign, 'sfis': sfis, 'token': token, 'timestamp': timestamp };
                $http({
                    method: 'GET',
                    url: app.domain + 'common/checkNotifyItem29.action',
                    params: param
                }).then(function successCallback(response) {
                    if (response.data.success) {
                        var data = response.data.data.result;
                        if (data == "Y") {
                            ret = true;
                        } else if ("1" == data) {
                            //	健康告知信息填写不完整
                            //alert("健康告知信息填写不完整");
                            myFactory.alert('', '请完整填写未偿还金额及原因！', 'info');
                        } else if ("2" == data) {
                            //alert("财务告知信息填写不完整");
                            myFactory.alert('', '财务告知信息填写不完整！', 'info');
                        } else if ("3" == data) {
                            //alert("职业告知信息填写不完整");
                            myFactory.alert('', '职业告知信息填写不完整！', 'info');
                        } else {
                            //alert("未知信息填写不完整");
                            myFactory.alert('', '未知信息填写不完整！', 'info');
                        }
                    }
                }, function errorCallback(response) {
                    $.alert({
                        title: '',
                        text: '查询失败!',
                        onOK: function() {}
                    });
                });
                return ret;
            }
            
            //保单详情弹窗
            $scope.showPolicyDetail = function() {
                modal('open', 'policyModalOn29Input', 'policyWindowOn29Input', 'policyCloseXOn29Input');
                var token = sessionStorage.getItem("token");
                var timestamp = myFactory.getTimetamp();
                var sfis = "chdrnum-chdrcoy-token-timestamp";
                var signStr = "chdrnum=" + chdrnum01 + "&chdrcoy=" + chdrcoy + "&token=" + token + "&timestamp=" + timestamp; //encodeURI(name)
                var sign = myFactory.hex(signStr);
                //初始化查询订单详情
                var policyData;
                $http({
                    method: 'GET',
                    url: app.domain + 'query/restFindPolicyDetail.action',
                    params: { 'chdrnum': chdrnum01, 'chdrcoy': chdrcoy, 'sign': sign, 'sfis': sfis, 'token': token, 'timestamp': timestamp }
                }).then(function successCallback(response) {
                    if (response.data.success) {
                        policyData = response.data.data;
                        $scope.policyData = policyData;
                    }
                }, function errorCallback(response) {
                    $.alert({
                        title: '',
                        text: '初始化查询订单详情失败!',
                        onOK: function() {
                            //点击确认
                        }
                    });
                });

            }

            //保单详情弹窗关闭函数
            $scope.policyCancelOn29Input = function() {
                modal('close', 'policyModalOn29Input', 'policyWindowOn29Input', 'policyCloseXOn29Input');
            }
            
            //重新受理
            $scope.renew = function() {
                myFactory.renew();
            }
            
            //退出移动保全
            $scope.exit = function() {
                myFactory.exit();
            }
            

            //S2020050812880-个人信息安全项目-修改变更项目录入页面的个人信息授权内容需求 add by yangyan 20200615 start
            //客户须知弹框
            $scope.tipOpen = function() {
                modal('open', 'a_pop_4', 'overwindow', 'a_pop_4_closeX');
            }
            $scope.tipClose = function() {
                    modal('close', 'a_pop_4', 'overwindow', 'a_pop_4_closeX');
                }
                //页面同意阅读协议复选框部分
            $scope.changeReadFlag = function() {
                $scope.readFlag = !$scope.readFlag;
            }

            $scope.privacyOpen = function() {
                    $state.go('privacy', {
                        itemId: itemId,
                        chdrnum01: chdrnum01,
                        chdrcoy: chdrcoy
                    });
                }
                //S2020050812880-个人信息安全项目-修改变更项目录入页面的个人信息授权内容需求 add by yangyan 20200615 end 

        }]);

    //指针弹窗
    app.directive('infoid', function() {
        return {
            restrict: 'EA', //指明指令在DOM里面以什么形式被声明,EA.表示即可以是元素也可以是属性
            templateUrl: 'html/input/content_base_info.html' + app.clearCache,
            replace: true, //设置解析后，DOM声明的指令是否消失
            link: function(scope, element, attrs) { //链接函数负责注册DOM事件和更新DOM,
                console.log('指令完成');
            }
        }
    });
})(app)